<?php
/* ================================================================================
 * Events Calendar
 *
 * index.php: This file contains cases for the fuse-box framework.
 *
 * Author: Eric Hendrickson (enhendrickson@liberty.edu)
 * Date: 7/20/06
   ================================================================================ */

	ini_set("include_path", ini_get("include_path") . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] . "/Common");
	//include files
	include('EventsCalendar.conf.php');
	include_once("Application/ApplicationTemplate.php");
	include_once("Application/Application.php");
	include_once("Application/Appserver.php");

	//start buffering the output
	ob_start();
	
	$Application = new Application();
	$Application->ApplicationInfoByCurrentLocation();
	$ApplicationRoot = $Application->ApplicationInfo['app_path'];
	$AppID = $Application->ApplicationInfo['app_id'];
		
	$Template = new ApplicationTemplate("/".$ApplicationRoot."templates/admin/template.htm");
	
	$AppServer = new AppServer();
	
	//Get the session info
	$SessionInfo = $SSO->getSessionInformation();

	switch($_GET['action'])
	{
		case 'logout':
			$Template->printTemplate($AppServer,'logout.php');
			break;
		case 'login':
			$Template->printTemplate($AppServer,'login.php');
			break;
		case 'save':
			$Template->printTemplate($AppServer,'new.php');
			break;
		case 'new':
			$Template->printTemplate($AppServer,'new.php');
			break;
		case 'edit':
			$Template->printTemplate($AppServer,'edit.php');
			break;
		case 'delete':
			$Template->printTemplate($AppServer,'delete.php');
			break;
		case 'main':
			$Template->printTemplate($AppServer,'main.php');
			break;
		default:
			$Template->printTemplate($AppServer,'main.php');
			break;
	}

	//flush all buffered output to the browser and stop buffering
	ob_end_flush();
?>


